﻿<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ page import="nc.vo.sm.UserVO"%>
<%@ page import="nc.bs.ebvp.login.Constant"%>
<%@ page import="nc.bs.ebvp.sourcingcoll.Constants"%>
<%@ page import="nc.bs.ebvppub.ebvpservicefactory.LoadConfigProperty"%>
<%
	String basePath = request.getContextPath();
	String strProjPk = request.getParameter("pkProj");
	String strParaEc021 = (String)request.getSession().getAttribute(Constants.ID_EC021);
	UserVO userVo = (UserVO)request.getSession().getAttribute(Constant.USER_INFO);
	boolean isClientCa = false;
	//供应商客户端是否支持CA
	if("Y".equalsIgnoreCase(strParaEc021) || (null != userVo.getIsca() && userVo.getIsca().booleanValue())){
		isClientCa = true;
	}
	//CA厂商名称
	String strCaFactory = (String)request.getSession().getAttribute(LoadConfigProperty.EBVP_CA_FACTORY);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>确认开标登记表</title>
		<%if(isClientCa){%>
			<%if(Constants.CA_FACTORY_ITRUS.equals(strCaFactory)){%>
				<script type="text/javascript" src="js/itrusforNC.js"></script>
				<script type="text/javascript" src="js/pta.js"></script>
			<%} else if(Constants.CA_FACTORY_INFOSEC.equals(strCaFactory)){%>
				<script type="text/javascript" src="js/Infosec4NC.js"></script>
			<%} else if(Constants.CA_FACTORY_DEAN.equals(strCaFactory)){%>
				<script type="text/javascript" src="js/DatechJs.js"></script>
			<%} %>
		<%}%>
	</head>
	<body class="fullbody">
		<div class="context">
			<div class="position">
				<div class="tposi">
					当前位置：
					<a href="<%=basePath%>/infopub/pubmain"	class="linkstyle">首页</a> &nbsp;&gt;&gt;&nbsp;
					<a href="<%=basePath%>/sourcing/projlist" class="linkstyle">我的投标\谈判\询价</a> &nbsp;&gt;&gt;&nbsp;
					<a href="<%=basePath%>/sourcing/biddingprojlist" class="linkstyle">进行中的项目</a> &nbsp;&gt;&gt;&nbsp;
					<a href="<%=basePath%>/sourcing/biddingprojlist/projexec?pk_pur_project=<%=strProjPk%>" class="linkstyle">${PURPROJECT_FORM.project_name}</a> &nbsp;&gt;&gt;&nbsp;
					<span class="curposition">确认开标登记表</span>
				</div>
				<div class="help">
					<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/html/QRKBDJB.html');" class="linkstyle">帮助</a>
				</div>
			</div>
			<div class="margin8">
			</div>
			<div class="subpage_title">
				<div class="title_index">
                     <img src="<%=basePath%>/images/common/dot03.gif" alt="" border="0" />&nbsp;确认开标登记表
                 </div>
			</div>
			<div class="margin20">
            </div>
			<div class="subpage_bidlist">
				<table class="replytxt" width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="128" height="15"></td>
						<td width="176"></td>
						<td width="96"></td>
						<td width="210"></td>
					</tr>
					<tr>
						<td height="35" align="right">
							供应商编码：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.supp_code}
						</td>
						<td align="right">
							供应商名称：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.supp_name}
						</td>
					</tr>
					<tr>
						<td height="35" align="right">
							投标总价：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.total_amount}
						</td>
						<td align="right">
							国家或区域：&nbsp;
						</td>
						<td align="left">
						</td>
					</tr>
					<tr>
						<td height="35" align="right">
							工期：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.dead_line}
						</td>
						<td align="right">
							讲标顺序：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.bid_index}
						</td>
					</tr>
					<tr>
						<td height="35" align="right">
							说明：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.memo}
						</td>
						<td align="right">
							投标保证金：&nbsp;
						</td>
						<td align="left">
							${REG_FORM.deposit_amount}
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td height="35" align="left" colspan="4">
							<div id="errorM" class="msgcolor">
								${MSG}
							</div>
						</td>
					</tr>
					<tr>
						<td height="35" align="center">
						</td>
						<td height="35" align="center" colspan="2">
							<input type="button" class="buttonok" value="确认" onclick="doReply();" />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="button" class="buttoncan" value="返回" onclick="javascript:history.back();"/>
						</td>
						<td height="35" align="center">
						</td>
					</tr>
					<form name="replyform" id="replyform" method="post">
						<input type="hidden" name="casn" value=""/>
						<input type="hidden" name="signature" value=""/>
						<input type="hidden" name="pk_unseal_reg_b" id="pk_unseal_reg_b" value="${REG_FORM.pk_unseal_reg_b}" />
					</form>
				</table>
			</div>
		</div>
		<script language="javascript">
			//提交响应信息
			function doReply(){
				<c:if test="${PROJ_STEP_STATUS != 2}">
				alert("环节已完成或终止，不允许操作！");
				return;
				</c:if>
				<c:if test="${REG_FORM.confirm_psn != null}">
				alert("已经确认，不允许重复操作！");
				return;
				</c:if>
				<%if(isClientCa){%>
					//证书SN
					var strSn = getSN("${USER_CODE}");
					if(strSn == null || strSn == ""){
						alert("请插入Key后再进行操作！");
						return;
					}
					document.replyform.casn.value = strSn;
					//方案主键|发布类单据主键|供应商对应用户主键
					var strSignData = "${REG_FORM.pk_unseal_reg_b}" + "|" + "${USER_ID}";
					//签名
					document.replyform.signature.value = signmessage(strSignData,"${USER_CODE}");
				<%}%>
				document.replyform.action = "<%=basePath%>/sourcing/biddingprojlist/confirmreg";
				document.replyform.submit();
			}
		</script>
	</body>
</html>
